package com.zsr.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author zsr
 * @Description
 * @Date 2021/4/27 20:11
 */
@Controller
@RequestMapping("/helloController")
public class HelloController {

    @RequestMapping("/doHello")
    public String hello(Model model){
        //封装数据
        model.addAttribute("msg","Hello,SpringMVCAnnotation");
        return "hello"; //会被视图解析器处理
    }
}
